class_name GoldDisplay
extends HBoxContainer

# ===============================================

@export var player_stats: PlayerStats

# ===============================================

@onready var gold: Label = $Gold

# ===============================================

func __on_player_stats_changed() -> void:
	gold.text = str(player_stats.gold)

# ===============================================

func _ready() -> void:
	player_stats.changed.connect(__on_player_stats_changed)
	__on_player_stats_changed()
	
